package com.example.floristshop.database;

import com.example.floristshop.R;

import org.litepal.annotation.Column;
import org.litepal.crud.LitePalSupport;

public class Flower extends LitePalSupport {
    //标识号
    @Column(unique = true)
    private long flower_id;
    //花名
    @Column(unique = true, nullable = false)
    private String name;
    //简介、类型、原产地
    private String intro, type, origin;
    //图片
    private int image;


    //Constructor
    public Flower(){
        this.flower_id = -1;
        this.name = "出错了";
        this.intro = "null";
        this.type = "null";
        this.origin = "null";
        this.image = R.mipmap.image_error;
    }

    public Flower(long flower_id, String name, String intro, String type, String origin, int image) {
        this.flower_id = flower_id;
        this.name = name;
        this.intro = intro;
        this.type = type;
        this.origin = origin;
        this.image = image;
    }


    //Getters
    public long getFlower_id() {
        return flower_id;
    }

    public String getName() {
        return name;
    }

    public String getIntro() {
        return intro;
    }

    public String getType() {
        return type;
    }

    public String getOrigin() {
        return origin;
    }

    public int getImage() {
        return image;
    }


    //Setters
    public void setFlower_id(long flower_id) {
        this.flower_id = flower_id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public void setImage(int image) {
        this.image = image;
    }
}
